package com.indexingsystem.system.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.indexingsystem.boss.admin.mapper.UserInfosMapper;
import com.indexingsystem.boss.entity.UserInfos;
import com.indexingsystem.system.service.IUserInfosService;

@Service
public class UserInfosServiceImpl implements IUserInfosService {

	@Resource
	private UserInfosMapper usersInfoMapper;

	@Override
	public int deleteByPrimaryKey(String userInfoId) {
		return usersInfoMapper.deleteByPrimaryKey(userInfoId);
	}

	@Override
	public int insertSelective(UserInfos record) {
		return usersInfoMapper.insertUserInfoSelective(record);
	}

	@Override
	public UserInfos selectByPrimaryKey(String userInfoId) {
		return usersInfoMapper.selectByPrimaryKey(userInfoId);
	}

	@Override
	public int updateByPrimaryKeySelective(UserInfos record) {
		return usersInfoMapper.updateByPrimaryKeySelective(record);
	}
	
	/**
	 * 通过身份证查询是否已存在.
	 * 
	 * @param identityCard
	 * @return
	 */
	@Override
	public UserInfos getUserInfosByIdentityCard(String identityCard){
		return usersInfoMapper.getUserInfosByIdentityCard(identityCard);
	}

	/**
	 * 根据userId查询主键.
	 * 
	 * @param userId
	 * @return
	 */
	@Override
	public UserInfos selectUserInfoByUserId(String userId) {
		return usersInfoMapper.selectUserInfoByUserId(userId);
	}

	/**
	 * 通过用户id删除用户详情信息.
	 */
	@Override
	public int deleteUserInfoByUserId(String userId) {
		return usersInfoMapper.deleteUserInfoByUserId(userId);
	}

	@Override
	public UserInfos selectUserInfoByUserIdVo(String userId) {
		return usersInfoMapper.selectUserInfoByUserIdVo(userId);
	}
}